﻿package com.snake.core{
	import effects.*;
	import flash.display.MovieClip;
	import flash.display.Stage;
	import flash.media.Sound;
	public final class Game {
		public static var main_stage:Stage=null;
		public static var fx_eat_food:Sound=null;
		public static var fx_death:Sound=null;
		public static var map:Map=null;
		public static var goto=null;
		public static var snake:SnakeInstance=null;
		public static var food:FoodInstance=null;
		public static var score:int=0;
		public static var score_inc_amount:int=0;
		public static function lost() {
			var blank=map.getTile(snake.index).isBlank;
			if (! blank) {
				return true;
			}
			if (snake.out) {
				return true;
			}
		}
		public static function inc_score() {
			score+=score_inc_amount;
		}
		public static function destroy_elements() {
			snake.destroy();
			food.destroy();
		}
	}
}